package com.iris.live.services.data.repositories;

import com.iris.live.services.data.models.报价五星延保Model;
import com.iris.live.services.data.models.报价随车表Model;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.math.BigDecimal;

/**
 * Created by Administrator on 2017/4/10.
 */
public interface 报价随车表Repository extends JpaRepository<报价随车表Model, Integer>, JpaSpecificationExecutor<报价随车表Model> {
    @Query("select SUM(m.随车成本) as si from 报价随车表Model m where m.报价编号 = ?1 AND m.随车类型 ='厂家' and m.随车名称 !='购置税' ")
    BigDecimal findby报价编号(int 编号);
}
